\section{type --- description of argument type}
\label{fn:type}
\index{type()}
\index{description of argument type}
\index{variable!description}
\begin{rail}
Type : 'type' '(' ( Scalar | Matrix ) ')' ;
\end{rail}

\verb+type+ returns a string that describes the type of element
contained in the argument. 
The results are:
\begin{description}
\item [real] a real scalar or matrix
\item [complex] a complex scalar or matrix
\item [string] a string or string matrix
\item [user] a user defined function
\item [builtin] a built in function
\end{description}

In addition, if the argument is a list, with a string element named
\verb+type+, that string will be returned.  If the list doesn't have
an element named \verb+type+, or that element doesn't contain a string,
the return value is an empty string.

\paragraph{Example}
\index{example of type()}
\index{type()!example}
\begin{verbatim}
> type(2.43)
real
> type(2.43+4j)
complex
> type("this is a string")
string
> type(sin)
builtin
> type(sin(3.14))
real
> type(union)
user
\end{verbatim}

See also: Page \pageref{fn:class} \verb+class()+,
Page \pageref{fn:show} \verb+show()+.

\newpage






